package po;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import po.Dish;

@Entity
@Table(name = "IOS_ORDER_ITEMS")
public class OrderItems implements Serializable {

	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")
	private String oiid;
	@ManyToOne
	@JoinColumn(name = "oid")
	private Orders order;
	private int num;
	private String dName;
	private double price;
	private String img;
	private String did;

	public OrderItems() {
		super();
		// TODO Auto-generated constructor stub
	}

	public OrderItems(Orders order, int num, String dName, double price,
			String img) {
		super();
		this.order = order;
		this.num = num;
		this.dName = dName;
		this.price = price;
		this.img = img;
	}

	public OrderItems(String oiid, Orders order, int num, String dName,
			double price, String img) {
		super();
		this.oiid = oiid;
		this.order = order;
		this.num = num;
		this.dName = dName;
		this.price = price;
		this.img = img;
	}

	public String getOiid() {
		return oiid;
	}

	public void setOiid(String oiid) {
		this.oiid = oiid;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public Orders getOrder() {
		return order;
	}

	public void setOrder(Orders order) {
		this.order = order;
	}

	public String getdName() {
		return dName;
	}

	public void setdName(String dName) {
		this.dName = dName;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public String getDid() {
		return did;
	}

	public void setDid(String did) {
		this.did = did;
	}
	
}
